<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en">
<head>
    <title>Machine Search{% if host or owner or group%} Results{% endif %}</title>
</head>
<body>
  <h1>Search</h1>
  <form action="search" method="GET">
  {% csrf_token %}
    Search:<br>
    <label>Host:</label><input type="text" name="host" value="{{ host|escape }}"><br>
    <label>Owner:</label><input type="text" name="owner" value="{{ owner|escape }}"><br>
    <label>Group:</label><input type="text" name="groupname" value="{{ groupname|escape }}"><br>
    <input type="submit" value="Search">
  </form>

  {% if host or owner or group%}
    <h2>Results for "{{ host|escape }}":</h2>

    {% if results %}
      <ul>
      {% for machine in results %}
        <li>{{ machine |escape }}</l1>
      {% endfor %}
      </ul>
    {% else %}
      <p>No machine found</p>
    {% endif %}
  {% endif %}
</body>
</html>
